#ifndef SMAIN_H
#define SMAIN_H

#include <iostream>
#include <stdio.h>
#include <unistd.h>
#include <iostream>
#include <QtCore>
#include <QDebug>
#include <QCoreApplication>
#include <QObject>
#include <QtCore>
#include <QApplication>
#include <QtGui>
#include <QTextEdit>
#include <QAbstractItemModel>
#include <QCompleter>
#include <QStringListModel>
#include <QShortcut>
#include <QTextCodec>
#include <QSettings>
#include <QClipboard>
#include <QMessageBox>
#include <QtDebug>
#include <QDebug> 
#include <QDesktopServices>
#include <QDebug>
#include <QString>
#include <QSqlError>
#include <QSqlQuery>
#include <QSqlTableModel>
#include <QSqlRelationalTableModel>
#include <QSqlRelationalDelegate>
#include <QHeaderView>
#include <QSqlRecord>
#include <QSqlDatabase>
#include <QMap>
#include <QList>
#include <QStringList>






#include <QResource>
#include <QTextTable>
#include <QInputDialog>
#include <QMenu>
#include <QString>
#include <QtDebug>
#include <QDebug> 
#include <QDesktopServices>
#include <QDebug>
#include <QString>
#include <QMap>
#include <QList>
#include <QStringList>
#include <QObject>
#include <QDateTime>
#include <QDate>
#include <QImageReader>
#include <QPixmap>
#include <QSettings>
#include <QTimer>
#include <QProgressDialog>
#include <QPainter>
#include <QPixmap>
#include <QUrl>
#include <QColorDialog>
#include <QFileDialog>
#include <QMessageBox>
#include <QTcpSocket>
#include <QString>
#include <QDebug>
#include <QObject>
#include <QFileInfo>
#include <QObject>
#include <QHttp>
#include <QFile>
#include <QBuffer> 
#include <QTcpSocket>
#include <QString>
#include <QTextStream>
#include <QDebug>
#include <QAbstractSocket>
#include <QDateTime>
#include <QDate>
#include <QLocale>
#include <QObject>
#include <QFileInfo>
#include <QObject>
#include <QFile>
#include <QBuffer>


#if defined Q_WS_MAC
#define WEBAGENTNAME "Mac WebDavExplorer QT4.2 / PPK_W @ciz.ch"
#endif
#if defined Q_WS_WIN
#define WEBAGENTNAME "Windows WebDavExplorer QT4.2 / PPK_W @ciz.ch"
#endif
#if defined Q_WS_X11
#define WEBAGENTNAME "Unix WebDavExplorer QT4.2  / PPK_W @ciz.ch"
#endif


#define _PROGRAM_NAME_ "Qedit - Word-Completer by PPK-Webprogramm"
#define _PROGRAM_NAME_DOMAINE_ "qedit.ciz.ch"
#define _ORGANIZATION_NAME_ "PPK-Screendesign/Webprogramm"
#define _PROGRAM_VCMS_ "version 1.4.5"
#define _PROGRAM_TITLE_  _PROGRAM_NAME_" - "_PROGRAM_VCMS_
#define Q_WORKS_PEND "open"
#define _PROGRAM_SHORT_NAME "qeditwords"










/* write a file to utf-8 format */
static inline bool fwriteutf8 (QString fullFileName,QString xml)
{
    if (fullFileName.contains("/", Qt::CaseInsensitive)) {
    QString ultimacartellaaperta = fullFileName.left(fullFileName.lastIndexOf("/"))+"/";
    QDir dira(ultimacartellaaperta);
    if ( dira.mkpath(ultimacartellaaperta) ) { } else {
    return false;
    }
    }
    
        QTextCodec *codecx;
        codecx = QTextCodec::codecForMib(106);
        QFile f( fullFileName );
        if ( f.open( QFile::WriteOnly | QFile::Text ) )
        {
        QTextStream sw( &f );
        sw.setCodec(codecx);
        sw << xml;
        f.close();
        return true;
        }
        return false;
}







#include <QDomDocument>
#include <QtDebug>
#include <QDebug> 
#include <QSettings>
#include <QDomDocument>
#include <QDomElement>
#include <QDomImplementation>
#include <QDomProcessingInstruction>
#include <QFile>
#include <QTextCodec>

#include "dbword.h"

//
#endif // SMAIN_H

